package ground;

@SuppressWarnings("serial")
public class PositionTakenException extends Exception {

	// members
	private int xCord;
	private int yCord;
	private String type;
	
	// methods
	public PositionTakenException(int xCord, int yCord, String type) {
		this.xCord = xCord;
		this.yCord = yCord;
		this.type = type;
	}
	
	public String getMessage() {
		return String.format("There is already another %s at (%d,%d)", type, xCord, yCord);		
	}
}
